// Decompiled by GOOSIN CO,LTD Copyright 2010 Pavel Kouznetsov.
// home page: http://www.Goosin.net
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   Color.java

package include.bi;

import include.nseer_db.nseer_db;
import java.sql.ResultSet;

public class Color
{

	private String color[];

	public Color()
	{
		color = new String[0];
	}

	public String[] getColor(String unit_db_name, int count)
	{
		nseer_db db = new nseer_db(unit_db_name);
		color = new String[count];
		int i = 0;
		try
		{
			String sql = (new StringBuilder("select * from bi_color order by id limit ")).append(count).toString();
			for (ResultSet rs = db.executeQuery(sql); rs.next();)
			{
				color[i] = rs.getString("color");
				i++;
			}

			db.close();
		}
		catch (Exception ex)
		{
			ex.printStackTrace();
		}
		return color;
	}
}
